import { Model ,ModelDefinition} from "./Model";
export class User extends Model {
    static fields :ModelDefinition= {
      id: {
        type: 'string',
        primaryKey: true,
        autoIncrement: true
      },
      username: {
        type: 'string',
        unique: true,
        allowNull: false
      },
      email: {
        type: 'string',
        unique: true,
        allowNull: false
      },
      passwordHash: {
        type: 'string',
        allowNull: false
      },
      createdAt: {
        type: 'date',
        allowNull: false
      },
      lastLogin: {
        type: 'date',
        allowNull: true
      }
    };
}